﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TekaMUD.Engine.Framework;
using TekaMUD.Engine.Persistence;

namespace TekaMUD.Engine.ServerTasks
{
	public class SaveWorldTask : Task
	{
		public SaveWorldTask(): base("Save world task")
		{
		}
		public override void Execute()
		{
			Locks.StorageLock.EnterWriteLock();
			Logger.LogInfo("Updating...!");
			Storage.UpdateWorld();
			Locks.StorageLock.ExitWriteLock();
		}
	}
}
